package com.project.easy.common.framework.web.controller;


import com.project.easy.common.framework.web.entity.FrameworkOperationLog;
import com.project.easy.common.framework.web.entity.dto.OperationLogPageReq;
import com.project.easy.common.log.annotation.Logging;
import  com.project.easy.common.util.constants.VersionConstant;
import  com.project.easy.common.util.dto.PageResDto;
import  com.project.easy.common.util.dto.R;
import com.project.easy.common.framework.web.annotation.ApiValidator;
import com.project.easy.common.framework.web.service.IFrameworkOperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author GreatorMan.cool
 * @since 2022-07-20
 */
@RestController
@RequestMapping("/api/" + VersionConstant.ONE + "/zysoft/operationLog")
public class FrameworkOperationLogController extends BaseController {

    @Autowired
    private IFrameworkOperationLogService frameworkOperationLogService;

    /**
     * 列表
     * @param operationLogPageReq 参数
     * @return 返回数据
     */
    @PostMapping("/pageList")
    @Logging
    @ApiValidator
    public R<PageResDto<FrameworkOperationLog>> pageList(@RequestBody OperationLogPageReq operationLogPageReq) {
        return R.success(frameworkOperationLogService.queryList(operationLogPageReq));
    }

}
